local charset = ("\
 ☺☻♥♦♣♠•◘○◙♂♀♪♫☼\
►◄↕‼¶§▬↨↑↓→←∟↔▲▼\
 !\"#$%&'()*+,-./\
0123456789:;<=>?\
@ABCDEFGHIJKLMNO\
PQRSTUVWXYZ[\\]^_\
`abcdefghijklmno\
pqrstuvwxyz{|}~⌂\
ÇüéâäàåçêëèïîìÄÅ\
ÉæÆôöòûùÿÖÜ¢£¥₧ƒ\
áíóúñÑªº¿⌐¬½¼¡«»\
░▒▓│┤╡╢╖╕╣║╗╝╜╛┐\
└┴┬├─┼╞╟╚╔╩╦╠═╬╧\
╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀\
αßΓπΣσµτΦΘΩδ∞φε∩\
≡±≥≤⌠⌡÷≈°∙·√ⁿ²■�"):gsub("\n", "")

function loadFont()
    font = love.graphics.newImageFont("dwarf.png", charset)
    love.graphics.setFont(font)
end

function newGrid()
    local grid = {}

    for y = 1, HEIGHT do
        grid[y] = {}
        for x = 1, WIDTH do
            grid[y][x] = {char = ' '}
        end
    end

    return grid
end

function drawText(grid, message)
    for y = 1, HEIGHT do
        for x = 1, WIDTH do
            if grid[y][x].color then
                love.graphics.setColor(grid[y][x].color)
            else
                love.graphics.setColor(COLOR.WHITE)
            end

            love.graphics.print(grid[y][x].char, 9 * x - 9, 12 * y - 9)
        end
    end

    love.graphics.print(message, 0, HEIGHT * 12)
end
